home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / MacHaskell 2.2 / progs / demo / X11 / gobang / README < prev    next >
Encoding:
Text File  |  1994-09-27  |  3.1 KB  |  67 lines  |  [TEXT/ttxt]

  1. gobang       Weiming Wu & Niping Wu
  2.  
  3.  
  4. Introduction
  5.  
  6. Our final project is to design and implement a Gobang game under
  7. X-Window3.2 environment, using the Haskell programming language. Users
  8. can play the game human-vs-human.  The program also provides a robot
  9. player with whom the user can play the game with.  We wrote altogether
  10. ten modules which were saved in different files to control the whole
  11. game.
  12.  
  13.  
  14. About Gobang
  15.  
  16. The checkerboard of Gobang consists of 19 vertical lines and 19
  17. horizontal lines.  Two players in turn place a unit on the
  18. checkerboard.  Each unit should be put on an unoccupied intersection
  19. of a vertical and a horizontal line.  The winner is the player who
  20. first makes five consecutive units on either vertical, horizontal or
  21. diagonal direction.
  22.  
  23. The program is able to perform the following tasks: 1) Use a new
  24. window under X-Window interface to display the checkerboard.  Players
  25. will use a mouse to place units onto the chessboard, where a unit is a
  26. circle with the color black or white.  2) Prompt for the names of both
  27. players and display them.  3) Calculate the time both players have
  28. used up.  4) Supervise the progress of the game, declare winner and
  29. end the game once one player wins.  5) At each point of the game,
  30. store the progress of the game, so players can review each step during
  31. the game.  6) There are five buttons on the screen which would provide
  32. some special services such as starting a new game, quitting the game,
  33. saving the game, importing the saved game, or reviewing the game as
  34. soon as the user selects the corresponding buttons.  7) Provide a
  35. moderately well robot player for that game (using minimum-maximum
  36. algorithm).
  37.  
  38.  
  39. Running Gobang
  40.  
  41. A window titled "gobang" will appear on the screen.  On it is a
  42. checkerboard, clocks and buttons.  There will be an instruction saying
  43. "Please enter the name of player-1".  The user can do two things:
  44. either enter the name of a player or choose the "import" button. Once
  45. the "import" button is selected, an unfinished game, which was saved
  46. in the file "###go.bhs###" will be imported.  Please notice that the
  47. character "@" is reserved for the robot player, so if the user types
  48. in @ as the name of the first player, it is assumed that player-1 is
  49. the robot player.  Then the name of player 2 is prompted.  The game
  50. starts and at each turn an instruction like "Please enter your play."
  51. would appear on the screen.  The user should put a unit onto the
  52. checkerboard.  If the button is clicked on a wrong place or a unit is
  53. put onto an occupied position, an error message saying "Wrong Point.
  54. Please reenter." will appear on the screen and the user should reenter
  55. his play.  The marker next to the name of a player indicates whose
  56. turn it is.  At any point of the game the user can choose the other
  57. four buttons.  If the "new" button is selected, the present game will
  58. be terminated and a new blank checkerboard will be displayed on the
  59. screen; if the "review" button is selected, one step of the previous
  60. plays will be displayed each time after the user hits any key; if the
  61. "save" button is selected, the steps so far will be saved into the
  62. file "###go.bhs###"; if the "quit" button is selected, the game will
  63. be terminated.
  64.  
  65.  
  66.  
  67.